/**
 * Copyright (C), 2015-2019, XXX有限公司
 * FileName: Menu
 * Author:   zhouheng
 * Date:     2019/6/8 23:41
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.zhouh.golden.system.domain;

import com.zhouh.golden.common.annotation.ExportConfig;
import lombok.Data;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 〈一句话功能简述〉<br> 
 * 〈〉
 *
 * @author zhouheng
 * @create 2019/6/8
 * @since 1.0.0
 */
@Data
@ToString
@Table(name = "t_menu")
public class Menu implements Serializable {

    private static final long serialVersionUID = 7187628714679791771L;

    public static final String TYPE_MENU = "0";
    public static final String TYPE_BUTTON = "1";

    @Id
    @GeneratedValue(generator = "JDBC")
    @Column(name = "menu_id")
    @ExportConfig(value = "编号")
    private Long menuId;

    @Column(name = "parent_id")
    private Long parentId;

    @Column(name = "menu_name")
    @ExportConfig(value = "名称")
    private String menuName;

    @Column(name = "url")
    @ExportConfig(value = "地址")
    private String url;

    @Column(name = "perms")
    @ExportConfig(value = "权限标识")
    private String perms;

    @Column(name = "icon")
    @ExportConfig(value = "图标")
    private String icon;

    @Column(name = "type")
    @ExportConfig(value = "类型", convert = "s:0=菜单,1=按钮")
    private String type;

    @Column(name = "order_num")
    private Long orderNum;

    @Column(name = "create_time")
    @ExportConfig(value = "创建时间", convert = "c:cc.mrbird.common.utils.poi.convert.TimeConvert")
    private Date createTime;

    @Column(name = "modify_time")
    private Date modifyTime;
}